package cn.ad.server.web.spring.model.jesgoo;

import cn.ad.server.domain.enumration.Connection;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zooy on 17-1-24.
 */
public enum JesgooConnection {

    WIFI(Connection.WIFI, 1),
    UNKNOWN(Connection.UNKNOWN, 2),
    CELLULAR_NETWORKS_2G(Connection.NET2G, 3),
    CELLULAR_NETWORKS_3G(Connection.NET3G, 4),
    CELLULAR_NETWORKS_4G(Connection.NET4G, 5);

    private Connection connection;

    private int value;

    public final static Map<Connection, Integer> jesgooConnectionMap = new HashMap<>();

    static {
        for (JesgooConnection jesgooConnection : JesgooConnection.values()) {
            jesgooConnectionMap.put(jesgooConnection.connection, jesgooConnection.value);
        }
    }

    JesgooConnection(Connection connection, int value) {
        this.connection = connection;
        this.value = value;
    }

}
